<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">


<ui:composition template="/templates/principal.xhtml">

	<ui:define name="corpo">

		<div id="login">
			<div style="padding-left: 50px; padding-right:100px; float: left; margin: 20px 0px 20px 0px;">
				<h:graphicImage library="imagens" name="logo.jpeg" />
			</div>

			<h1>Entrar no Dponto</h1>

			<div style="padding-left: 50px; float: left;">

				<h:panelGroup rendered="#{!empty param.login_error}">
					<div id="login_erro">
						<span>Erro ao efetuar o login</span> <br /> Usuário ou senha
						inválido
					</div>
				</h:panelGroup>

				<form id="form_login" method="post"
					action="#{request.contextPath}/j_spring_security_check">
					<div id="formulario_login" style="margin: 20px 0px 20px 0px;" >
					<table>
						<tr>
							<td>Login</td>
							<td><input type='text' name='j_username'  style="width: 300px;"></input></td>
						</tr>
						<tr>
							<td>Senha</td>
							<td><input type='password' name='j_password'  style="width: 300px;"></input></td>
						</tr>						
						<tr>
							<td></td>
							<td><input type='submit' value="Entrar"  class="button_login"     ></input></td>
						</tr>						
						<tr>
							<td align="right"><input type='checkbox'
								name='_spring_security_remember_me'></input></td>
							<td style="font-weight: normal; color: #000">Entrar automaticamente</td>
						</tr>
					</table>
					</div>

					<script>
					document.getElementById("form_login").j_username.value="#{SPRING_SECURITY_LAST_USERNAME}";
				</script>
				</form>
				
			</div>
		</div>
	</ui:define>
</ui:composition>
</html>